<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新增管理员</title>
	<include file="Public:header" />
	<style type="text/css">
		.m-input{width:180px;border:1px solid #ccc;padding:2px;}
	</style>
	<script type="text/javascript">
		function chkfrm()
		{
			if($('#username').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入用户名',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#password').val()=='' || $('#password').val().length<5 || $('#password').val().length>18)
			{
				$.messager.show({title:'提示',msg:'请正确输入新密码，长度在5~18位之间',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#password2').val()=='' || $('#password').val()!=$('#password2').val())
			{
				$.messager.show({title:'提示',msg:'请确认密码，两次密码需要一致',timeout:5000,showType:'slide'});
				return false;
			}
			$('#form1').submit();
		}
	</script>
</head>
<body class="">
	<h2>&nbsp;</h2>
	<div class="demo-info space-out-10px">
		<div class="demo-tip icon-tip"></div>
		<div>增加一个新的管理员来分担工作，密码长度为5~18位</div>
	</div>
	<form id="form1" method="post" action="{:U('Index/account_add_save')}">
		<table class="space-out-10px">
		<tr>
		<td>用户名：</td><td><input type="text" id="username" name="username" class="easyui-validatebox m-input" required="true" validType="length[1,18]" /></td>
		</tr>
		<tr>
		<td>密码：</td><td><input type="password" id="password" name="password" class="easyui-validatebox m-input" required="true" validType="length[1,18]" /></td>		
		</tr>
		<tr>
		<td>确认密码：</td><td><input type="password" id="password2" name="password2" class="easyui-validatebox m-input" required="true" validType="length[5,18]" /></td>
		</tr>
		<tr>
		<td>角色：</td><td><input type="radio" name="role" value="user" checked />用户 <input type="radio" name="role" value="pos" />前台POS  <input type="radio" name="role" value="admin" />管理员  </td>
		</tr>
		<tr>
		<td>&nbsp;</td><td>
		<input type="hidden" id="logintime" name="logintime" value="0" />
		<input type="hidden" id="loginip" name="loginip" value="127.0.0.1" />
		<input type="hidden" id="status_flg" name="status_flg" value="Y" />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-save" onclick="chkfrm()">保存</a>
		<a href="{:U('Index/account_list')}" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
		</td>
		</tr>
		</table>
	</form>
</body>
</html>
